//@author A0101906R
#ifndef TASK_H
#define TASK_H

#include "Const.h"
#include "DateTime.h"
#include <vector>

namespace Twentyfifth {
	class Task {
	public:
		enum TaskType { TIMED_TASK, DEADLINE_TASK, TASK, QUERY, INVALID };

	protected:
		TaskType taskType;
		int id;
		std::string description;
		std::string venue;
		DateTime start;
		DateTime end;
		DateTime deadline;
		bool done;
		bool doneToggle;
		std::string gcal_id;
		bool gcal_fullday;
		bool isDeleted;
		DateTime lastUpdated;

	public:
		Task();
		static TaskType identifyTaskType(std::string);

		void setId(int);
		void setDescription(std::string);
		void setVenue(std::string);
		void setTaskType(std::string);
		void setTaskType(TaskType);
		void setStart(DateTime);
		void setEnd(DateTime);
		void setDeadline(DateTime);
		void setDone();
		void setUndone();
		void setToggle();
		void setGCalId(std::string);
		void setFullDay(bool);
		void setLastUpdated(DateTime);
		void setDeleted(bool);

		int getId();
		std::string getDescription();
		std::string getVenue();
		TaskType getTaskType();
		DateTime getStart();
		DateTime getEnd();
		DateTime getDeadline();
		bool isDone();
		std::string getGCalId();
		bool isFullDay();
		DateTime getLastUpdated();
		bool getDeleted();

		//---------------functions remain-----------------
		void print();

		//-----------------functions i dont understand----------------
		std::string toString();
		std::vector<std::string> toStringVector();
		std::vector<std::string> toStringTimedVector();
		std::vector<std::string> toStringDeadlineVector();
		std::vector<std::string> toStringTaskVector();
		//--------------functions for TimedTask---------------
		std::string toStringTimed();
		//-----------------functions for DeadlineTask--------------
		std::string toStringDeadline();
		//------------------funtions for to-do list----------------
		std::string toStringTask();
		//--------------additional subclass, query (for command like delete)-----------------
		std::string toStringQuery();
	};
}

#endif